package org.truenewx.tnxjeex.unit.model;

import javax.measure.quantity.Area;

import org.truenewx.tnxjee.core.caption.Caption;
import org.truenewx.tnxjee.core.enums.annotation.SimpleEnumType;
import org.truenewx.tnxjeex.unit.support.MeasureUnits;
import org.truenewx.tnxjeex.unit.util.UnitTypes;
import tech.units.indriya.unit.Units;

/**
 * 面积单位
 */
@Caption("面积单位")
@SimpleEnumType(name = UnitTypes.AREA)
public interface AreaUnit extends MeasureUnit<Area> {

    @Caption("平方千米")
    AreaUnit SQUARE_KILOMETER = MeasureUnits.getInstance().multiply(Units.SQUARE_METRE, 1000 * 1000, AreaUnit.class,
            "k" + Units.SQUARE_METRE, "SQUARE_KILOMETER", "ASQKM");

    @Caption("平方米")
    AreaUnit SQUARE_METER = MeasureUnits.getInstance()
            .add(Units.SQUARE_METRE, AreaUnit.class, null, "SQUARE_METER", "ASQM");

    @Caption("平方分米")
    AreaUnit SQUARE_DECIMETER = MeasureUnits.getInstance().divide(SQUARE_METER, 100, "d" + Units.SQUARE_METRE,
            "SQUARE_DECIMETER", "ASQDM");

    @Caption("平方厘米")
    AreaUnit SQUARE_CENTIMETER = MeasureUnits.getInstance().divide(SQUARE_DECIMETER, 100, "c" + Units.SQUARE_METRE,
            "SQUARE_CENTIMETER", "ASQCM");

}
